#ifndef _THREADPOOL__H
#define _THREADPOOL__H
#include <iostream>
#include <thread>
#include <vector>
#include "TaskQueue.h"
class ThreadPool{
private:
size_t _threadNum;
size_t _queSize;
vector<thread> _threads; //存放线程的容器
TaskQueue _taskQueue; //任务队列作为子对象
bool _isExit;
public:
ThreadPool(size_t threadNum,size_t queSize);
~ThreadPool();
void start();
void stop();
void addTask(Task* ptask);
Task* getTask();
void doTask();

};

#endif

